require([
        "esri/map",
        "esri/InfoTemplate",
        'esri/SpatialReference',
        'esri/layers/GraphicsLayer',
        'esri/graphic',
        'esri/geometry/Point',
        'esri/symbols/SimpleMarkerSymbol',
        'esri/symbols/SimpleFillSymbol',
        'esri/symbols/SimpleLineSymbol',
        'esri/Color',
        'esri/geometry/Circle',
        'dojo/on',
        "dijit/layout/BorderContainer",
        "dijit/layout/ContentPane",
        "dojo/parser",
        "jquery/jquery-1.11.1",
        "dojo/domReady!"

    ],
    function(
        Map,InfoTemplate, SpatialReference,GraphicsLayer ,Graphic,Point,SimpleMarkerSymbol,SimpleFillSymbol,SimpleLineSymbol,Color,Circle,
        on
    ) {
        var map = new Map("center", {
            basemap: "streets",  //For full list of pre-defined basemaps, navigate to http://arcg.is/1JVo6Wd
            center: [115.45, 35.75], // longitude, latitude
            zoom: 6
        });
        on(map,"load", function () {
            $.ajax({
                type: "GET",
                url: "package.json",
                dataType: "json",
                async: false,
                success: function (data) {
                    //console.log(data);
                    var template=new InfoTemplate();
                    var graphicsLayer = new GraphicsLayer();
                    graphicsLayer.setInfoTemplate(template);
                    map.addLayer(graphicsLayer);

                    for(var i= 0;i<data.length;i++){
                        var point = new Point(data[i].LGTD,data[i].LTTD,map.spacialReference);
                        var graphic=new Graphic(point,new SimpleMarkerSymbol(
                            SimpleMarkerSymbol.STYLE_CIRCLE, 10,
                            new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID,
                                new Color([255,0,0]), 1),
                            new Color([255,0,0,0.5])),data[i]);
                        graphicsLayer.add(graphic);
                            //on(graphicsLayer,"click",function(e){
                            //    map.graphics.clear();
                            //var hilightSymbol=    new SimpleMarkerSymbol(
                            //        SimpleMarkerSymbol.STYLE_CIRCLE, 10,
                            //        new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID,
                            //            new Color([255,255,0]), 3),
                            //        new Color([122,122,122,0.5]));
                            //    //console.log(e);
                            //    var hiGraphic = new  Graphic(e.graphic.geometry,hilightSymbol);
                            //    graphicsLayer.add(hiGraphic);
                            //
                            //
                            //})


                }



                }
            })
        })
    });





/**
 * Created by Administrator on 2016/9/10.
 */
